package com.ibeetl.admin.core.util.beetl;

import org.apache.commons.lang3.StringUtils;
import org.beetl.core.Context;
import org.beetl.core.Function;

public class SQLStringFunction implements Function {

	@Override
	public Object call(Object[] paras, Context ctx) {
		String method = (String)paras[0];

		if (StringUtils.equals(method, "split")) {
			String str = (String)paras[1];
			String regex = (String)paras[2];
			return StringUtils.split(str, regex);
		}

		return null;
	}

}
